<template>
		<div style="margin-top: 20px">
				<el-row type="flex" style="justify-content: space-between">
						<el-button type="primary" size="small" icon="el-icon-plus">添加账套</el-button>
						<el-button type="success" size="small" icon="el-icon-refresh" @click="listAllSalaries">刷新</el-button>
				</el-row>
				<el-row>
						<el-table :data="salaryData" :border="true" v-loading="loadingData">
								<el-table-column type="selection" width="55" align="center"></el-table-column>
								<el-table-column width="120" prop="name" align="center" label="账套名称"></el-table-column>
								<el-table-column width="120" prop="basicsalary" align="center" label="基本工资"></el-table-column>
								<el-table-column width="120" prop="trafficsalary" align="center" label="交通补助"></el-table-column>
								<el-table-column width="120" prop="lunchsalary" align="center" label="午餐补助"></el-table-column>
								<el-table-column width="120" prop="bonus" align="center" label="奖金"></el-table-column>
								<el-table-column width="120" prop="createdate" align="center" label="启用时间"></el-table-column>
								<el-table-column width="120" align="center" label="养老金">
										<el-table-column width="120" prop="pensionper" align="center" label="比率"></el-table-column>
										<el-table-column width="120" prop="pensionbase" align="center" label="基数"></el-table-column>
								</el-table-column>
								<el-table-column width="120" align="center" label="医疗保险">
										<el-table-column width="120" prop="medicalper" align="center" label="比率"></el-table-column>
										<el-table-column width="120" prop="medicalbase" align="center" label="基数"></el-table-column>
								</el-table-column>
								<el-table-column width="120" align="center" label="公积金">
										<el-table-column width="120" prop="accumulationfundper" align="center" label="比率"></el-table-column>
										<el-table-column width="120" prop="accumulationfundbase" align="center" label="基数"></el-table-column>
								</el-table-column>
								<el-table-column label="操作" align="center">
										<template slot-scope="scope">
												<el-button type="info" size="small">编辑</el-button>
												<el-button type="danger" size="small">删除</el-button>
										</template>
								</el-table-column>
						</el-table>
				</el-row>
		</div>
</template>

<script>
export default {
		name: "SalSob",
		data() {
				return {
						salaryData: [],
						loadingData: false
				}
		},
		mounted() {
				this.init();
		},
		methods: {
				init() {
						this.listAllSalaries();
				},
				listAllSalaries() {
						this.loadingData = true
						setTimeout(() => {
								this.$get("/salary/sob/listAllSalaries").then(res => {
										this.loadingData = false
										const {code} = res;
										if (code === 200) {
												this.salaryData = res.data
										}
								}, 200)
						})
				}
		},

}
</script>

<style scoped>

</style>
